from sqlalchemy import Column, Integer, String, create_engine, func
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class cninfo_api_diaoyan(Base):
    __tablename__ = "cninfo"

    aid = Column(Integer, primary_key=True)
    secCode = Column(String)
    secName = Column(String)
    announcementTitle = Column(String)
    raw_id = Column(String)
    orgId = Column(String)
    announcementId = Column(String)
    announcementTime = Column(String)
    adjunctUrl = Column(String)
    adjunctSize = Column(String)
    adjunctType = Column(String)
    storageTime = Column(String)
    columnId = Column(String)
    pageColumn = Column(String)
    announcementType = Column(String)
    associateAnnouncement = Column(String)
    important = Column(String)
    batchNum = Column(String)
    announcementContent = Column(String)
    orgName = Column(String)
    announcementTypeName = Column(String)


class report_deep(Base):
    __tablename__ = "choice_api_report"

    id = Column(String, primary_key=True)
    title = Column(String)
    industry = Column(String)
    file_name = Column(String)
    file_size = Column(String)
    file_pagenum = Column(String)
    file_url = Column(String)
    rtype = Column(String)
    reportDate = Column(String)
    code = Column(String)
    codename = Column(String)
    source = Column(String)


class wechat_sec(Base):
    __tablename__ = "wechat_article_list"

    id = Column(String, primary_key=True)
    title = Column(String)
    account_name = Column(String)
    author = Column(String)
    biz = Column(String)
    cover = Column(String)
    digest = Column(String)
    is_ad = Column(String)
    ilike = Column(String)
    publish_time = Column(String)
    iread = Column(String)
    url = Column(String)


class year_report(Base):
    __tablename__ = "year_report"

    file_id = Column(String, primary_key=True)
    file_name = Column(String)
    file_url = Column(String)
    file_type = Column(String)
    file_content = Column(String)
    file_newDate = Column(String)
    file_publishDate = Column(String)
    sec_code = Column(String)
    sec_name = Column(String)
    sec_VarietyCode = Column(String)
    file_title = Column(String)
    sec_title = Column(String)


class sseinfo_report(Base):
    __tablename__ = "sseinfo_report"

    id = Column(String, primary_key=True)
    id_ref = Column(String)
    stock_name = Column(String)
    stock_code = Column(String)
    stock_uid = Column(String)
    stock_image = Column(String)
    stock_report_name = Column(String)
    stock_report_url = Column(String)
    stock_report_time = Column(String)
    stock_report_timestamp = Column(Integer)
    created_at = Column(String)


class sseinfo_iwen(Base):
    __tablename__ = "sseinfo_iwen"

    id = Column(String, primary_key=True)
    id_ref = Column(String)
    stock_name = Column(String)
    stock_code = Column(String)
    stock_image = Column(String)
    question_id = Column(String)
    question_text = Column(String)
    question_time = Column(String)
    question_timestamp = Column(Integer)
    answer_id = Column(String)
    answer_text = Column(String)
    answer_time = Column(String)
    answer_timestamp = Column(Integer)
    created_at = Column(String)


class cninfo_iwen(Base):
    __tablename__ = "cninfo_iwen"

    id = Column(String, primary_key=True)
    stock_name = Column(String)
    stock_code = Column(String)
    stock_image = Column(String)
    question_text = Column(String)
    question_time = Column(String)
    question_timestamp = Column(Integer)
    answer_text = Column(String)
    answer_time = Column(String)
    answer_timestamp = Column(Integer)
    created_at = Column(String)